<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-compatible" content="IE=edge,chrome=1.0"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
    <title>培训商城</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/style.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/common.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/main.css">
</head>
<body>
<include file="Public/common" />
<section class="expertSection">
    <div class="mainTitle">
        <span class="title">培训商城</span>
        <br/>
        <span class="details">TRAINING MALL</span>
    </div>
    <php>
        $p = I('get.p',1);
        $topPage = $p - 1;
        //查询条件
        $wheretype = I('get.type','');
        //查询条件
        $newhot = I('get.newhot','');
    </php>
    <div class="classNav auto">
        <div class="con">
            <div class="navList clearfix">
                <a href="<?php echo U('index',array('p'=>1,'type'=>'','newhot'=>$newhot));?>" <if condition="$wheretype eq ''">class="active"</if>>全部</a>
                <foreach name="type" item="vo">
                    <a href="<?php echo U('index',array('p'=>1,'type'=>$vo[id],'newhot'=>$newhot));?>" <if condition="$wheretype eq $vo[id]">class="active"</if>>{$vo.name}</a>
                </foreach>
            </div>
            <div class="navList clearfix">
                <a href="<?php echo U('index',array('p'=>1,'type'=>$wheretype,'newhot'=>''));?>" <if condition="$newhot eq ''">class="active"</if>>默认</a>
                <a href="<?php echo U('index',array('p'=>1,'type'=>$wheretype,'newhot'=>'1'));?>" <if condition="$newhot eq '1'">class="active"</if>>最新</a>
                <a href="<?php echo U('index',array('p'=>1,'type'=>$wheretype,'newhot'=>'2'));?>" <if condition="$newhot eq '2'">class="active"</if>>最热</a>
            </div>
        </div>
    </div>
    <script>
        $(function()
        {

        })
    </script>
    <div class="content auto clearfix">
        <foreach name="list" item="vo">
            <div class="col">
                <a href="{:U('detail',array('id'=>$vo['id']))}">
                    <div class="hotShop">
                        <div class="top">
                            <div class="img">
                                <img src="{$vo.picture}" alt="">
                            </div>
                            <div class="btn-box">
                                <span> {$vo.name}</span>
                            </div>
                        </div>
                        <div class="bottom">
                            {$vo.title}
                        </div>
                    </div>
                </a>
            </div>
        </foreach>
    </div>
  <!--  <div class="pagination">
        <a href="javascript:;" class="btn-prev">上一页</a>
        <a href="#" class="active">1</a>
        <a href="#">2</a>
        <a href="#">3</a>
        <a href="javascript:;" class="btn-next">下一页</a>
    </div>-->
    <div class="pagination">
        <a href="<?php echo U('index',array('p'=>$p-1,'type'=>$wheretype,'newhot'=>$newhot));?>" class="btn-prev">上一页</a>
        <foreach name="page" item="vo">
            <a href="{:U('index',array('p'=>$vo[number],'type'=>$wheretype,'newhot'=>$newhot))}" <if condition="$p eq $vo[number]">class="active"</if> >{$vo.number}</a>
        </foreach>
        <a href="<?php echo U('index',array('p'=>$p+1,'type'=>$wheretype,'newhot'=>$newhot));?>" class="btn-next">下一页</a>
    </div>
</section>

<include file="Public/fotter" />
<script>
    //页面回顶
    $('.icon4').on('click',function(){
        $('html,body').animate({
            scrollTop:0
        },200)
    });
</script>
</body>
</html>